Mega Code Archive
Data Structure
1) A simple class to store in the array
2) A strongly typed collection of your own Objects
3) Add after a LinkedListNode
4) Add another list to the current list
5) Add element to an ArrayList and get its Length
6) Add element to List at position of 2
7) Add Item to Most Recent Used Item List
8) Add some elements to the dictionary There are no duplicate keys, but some of the values are duplicates
9) Add string element to String Collection
10) Add strings to List of String and use For Each loop to show each item
11) Add the word to the beginning of the linked list
12) Adds a range of elements from an array to the end of the StringCollection
13) Adds an object to the end of the ArrayList
14) All three generic overloads of the Array IndexOf method
15) All three overloads of the CopyTo method in List(Of (T))
16) Array
17) Array Class provides methods for creating, manipulating, searching, and sorting arrays
18) Array Exists(Of (T))
19) Array Find(Of (T))
20) Array FindAll(Of (T))
21) Array FindLast(Of (T))
22) Array FindLastIndex
23) Array GetLength
24) Array IndexOf and LastIndexOf
25) Array IndexOf(T) searches for the object and returns the index of the first occurrence
26) Array LastIndexOf(T) searches for the specified object and returns the index of the last occurrence
27) Array Length Property
28) Array Performance Test
29) Array Reverse and Sort
30) Array Reverse(values) Demo
31) Array SetValue for a seven-dimensional array
32) Array SetValue for three-dimensional array
33) Array SetValue for two-dimensional array
34) Array Sort Object who implements the IComparable
35) Array Sort sorts the elements in an entire one-dimensional Array using the IComparable
36) Array Sort(Of (TKey, TValue))(arrayTKey[]()[], arrayTValue[]()[])
37) Array TrueForAll(Of (T))
38) Array UBound
39) Array Upper Bound and Lower Bound
40) ArrayList
41) ArrayList BinarySearch (Object, IComparer)
42) ArrayList BinarySearch Searches the entire sorted ArrayList for an element using the default comparer
43) ArrayList Class Implements the IList interface
44) ArrayList Clear removes all elements from the ArrayList
45) ArrayList CopyTo copies the entire ArrayList to a compatible one-dimensional Array, starting at the beginning of the target
46) ArrayList FixedSize returns an ArrayList wrapper with a fixed size
47) ArrayList GetEnumerator returns an enumerator for a range of elements in the ArrayList
48) ArrayList GetRange returns an ArrayList which represents a subset of the elements in the source ArrayList
49) ArrayList IndexOf searches for the specified Object and returns the zero-based index
50) ArrayList Insert inserts an element into the ArrayList at the specified index
51) ArrayList IsReadOnly Property tells whether the ArrayList is read-only
52) ArrayList IsSynchronized Property tells whether access to the ArrayList is synchronized (thread safe)
53) ArrayList Item Property gets or sets the element at the specified index
54) ArrayList LastIndexOf searches for Object and returns the zero-based index of the last occurrence
55) ArrayList Remove removes the first occurrence of a specific object from the ArrayList
56) ArrayList Repeat Method returns an ArrayList whose elements are copies of the specified value
57) Assign value by index
58) Binary SearchObject who implements the IComparable
59) BitArray Class manages a compact array of bit values, which are represented as Booleans
60) BitArray Or Performs the bitwise OR operation
61) BitArray Xor performs the bitwise exclusive OR operation
62) Bounded array Example
63) Build your own linked list
64) CaseInsensitiveComparer Class compares two objects for equivalence, ignoring the case of strings
65) Change the last node
66) Change the Max Item Count Allowed Property in Most Recent Used Item List
67) Changes the number of elements of an array to the specified new size
68) Check if a directory does not exist, create a directory
69) Check the Capacity and Count
70) Check the existance of an item with Contains method
71) Check the List Capacity before and after adding elements
72) Check the state of the connection and report appropriately
73) Clear a List
74) Clear multi-dimensional array
75) Clears the entire collection
76) CollectionsUtil Class creates collections that ignore the case in strings
77) CompareOptions Enumeration defines the string comparison options to use with CompareInfo
78) ConcurrentBag(T) Class eepresents a thread-safe, unordered collection of objects
79) ConcurrentQueue(T) Class eepresents a thread-safe first in-first out (FIFO) collection
80) ConcurrentStack(T) represents a thread-safe last in-first out (LIFO) collection
81) ContainsKey can be used to test keys before inserting them
82) Convert ArrayList to Array
83) Convert element in List to string
84) Converting ToList
85) Converts an array of one type to an array of another type
86) Copies a range of elements from an Array to another Array
87) Copies all the elements from one Array to another Array
88) Copies BitArray to a compatible one-dimensional Array
89) Copies the elements of the ArrayList to a new array of the specified element type
90) Copies the last two elements from the Object array to the integer array
91) Copies the ListDictionary to an array with DictionaryEntry elements
92) Copies the StringDictionary to an array with DictionaryEntry elements
93) Copies the values to a string array and displays the string array
94) CopyTo method is used to copy the array elements beginning at the middle of the array
95) Create a fixed-size wrapper around an ArrayList
96) Create a HashSet from another HashSet
97) Create a Hashtable using a case-insensitive code provider and a case-insensitive comparer
98) Create a Hashtable using a case-insensitive code provider and a case-insensitive comparer based on the Turkish culture (tr-
99) Create a Hashtable using the default hash code provider and the default comparer
100) Create a new sorted dictionary of strings, with string keys
101) Create a second copy of the queue containing three null elements at the beginning
102) Create a SortedList using the CaseInsensitiveComparer based on the Turkish culture (tr-TR)
103) Create a SortedList using the default comparer
104) Create a SortedList using the specified CaseInsensitiveComparer
105) Create a SortedList using the StringComparer InvariantCultureIgnoreCase value
106) Create Case Insensitive Sorted List
107) Create directory with drive letter and without drive letter
108) Create elements from one array to another array
109) Create HashSet(Of T) class from another collection
110) Create HashSet(Of T) class that uses the default equality comparer for the set type
111) Create Hashtable class from another dictionary
112) Create LinkedList of String from String array
113) Create LinkedList(Of T) class that is empty
114) Create List(Of T) class that contains elements copied from the specified collection
115) Create List(Of T) class that is empty and has the specified initial capacity
116) Create SortedList that contains elements from dictionary
117) Creates a multidimensional Array of the specified Type and dimension lengths, with the specified lower bounds
118) Creates a multidimensional Array of the specified Type and dimension lengths, with zero-based indexing
119) Creates a one-dimensional Array of the specified Type and length, with zero-based indexing
120) Creates a queue of strings with default capacity and uses the Enqueue method to queue five strings
121) Creates a shallow copy of the Array
122) Creates a three-dimensional Array of the specified Type and dimension lengths, with zero-based indexing
123) Creates a two-dimensional Array of the specified Type and dimension lengths, with zero-based indexing
124) Creates and initializes a new three-dimensional Array of type Int32
125) Database Connection Properties
126) Database Connection state change event
127) Declare an Array and reference its member
128) Declaring, allocating and initializing arrays
129) Define and Init two dimensional array
130) Define and initialize the multi-dimensional array
131) Define Comparable Object and Sort them
132) Delete a Directory
133) Determines whether an array contains elements
134) Display the contents of the collection using For Each This is the preferred method
135) Display the contents of the collection using the enumerator
136) Display the contents of the collection using the Keys, Values, Count, and Item properties
137) Displays the contents of the OrderedDictionary using its enumerator
138) Displays the keys and values of the Hashtable using foreach statement
139) Dispose - called when we need disposing
140) Do While loop through a Collection
141) Does List contain a certain element
142) Enumerable All tells whether all elements of a sequence satisfy a condition
143) Enumerable Any Determines whether a sequence contains any elements
144) Enumerable Concat(TSource) concatenates two sequences
145) Enumerable Contains tells whether a sequence contains a specified element
146) Enumerable Distinct returns distinct elements from a sequence by using the default equality comparer to compare values
147) Enumerable Except produces the set difference of two sequences by using IEqualityComparer(Of T)
148) Enumerable Except produces the set difference of two sequences by using the default equality comparer to compare values
149) Enumerable GroupBy groups the elements of a sequence according to a specified key selector function and projects the elemen
150) Enumerable Intersect produces the set intersection of two sequences
151) Enumerable SequenceEqual Determines whether two sequences are equal by comparing the elements
152) Enumerable SequenceEqual determines whether two sequences are equal by comparing their elements by using a specified IEqual
153) Enumerable Union produces the set union of two sequences by using a specified IEqualityComparer(Of T)
154) Enumerable Union returns set union of two sequences by using the default equality comparer
155) For Each loop through a Collection
156) For Each loops through Array
157) Free arrays memory
158) Get and set current working directory
159) Get parent directory
160) Get range from a List
161) Get the fourth element
162) Get the item by index
163) Gets the lower bound of the specified dimension in the Array
164) Gets the value of the bit at a specific position in the BitArray
165) Gets value at the specified position in the one-dimensional Array
166) HashSet(T) Class Represents a set of values
167) HashSet(T) Clear Method removes all elements from a HashSet(Of T) object
168) HashSet(T) Contains Method tells whether a HashSet(Of T) object contains the specified element
169) HashSet(T) ExceptWith Method removes all elements in the specified collection from the current HashSet(Of T) object
170) HashSet(T) IsProperSubsetOf Method tells whether a HashSet(Of T) object is a proper subset of the specified collection
171) HashSet(T) SymmetricExceptWith Method keeps elements that are present either in that object or in the specified collection,
172) Hashtable
173) Hashtable Add Method adds an element with the specified key and value into the Hashtable
174) Hashtable Clear Method removes all elements from the Hashtable
175) Hashtable Contains Method Determines whether the Hashtable contains a specific key
176) Hashtable CopyTo Method copies the Hashtable elements to a one-dimensional Array instance at the specified index
177) Hashtable GetEnumerator Method returns an IDictionaryEnumerator that iterates through the Hashtable
178) Hashtable IsSynchronized Property gets a value indicating whether access to the Hashtable is synchronized (thread safe)
179) Hashtable Remove Method removes the element with the specified key from the Hashtable
180) HybridDictionary Class
181) IComparable Interface defines a type-specific comparison method
182) IComparer Demo
183) IConvertible Interface
184) IConvertible Interface defines methods for converting value types
185) IEnumerable
186) IEnumerable Interface exposes the enumerator, which supports a simple iteration over a non-generic collection
187) If a key does not exist, setting the default Item property for that key adds a new keyvalue pair
188) Implements a TextWriterTraceListener named myWriter to write to the console screen
189) Implements IEnumerable
190) Implements IFormatProvider
191) Inherit from CollectionBase
192) Init an Array in Declaration
193) Initialize BitArray from Boolean value array
194) Initialize BitArray from Byte array
195) Initialize BitArray from Integer array
196) Initialize BitArray with False values
197) Initializing a jagged array, one in which the length of each array differs
198) Initializing multidimensional arrays
199) Insert element at index
200) Insert in the middle of a List
201) Insert range
202) Inverts all the bit values in the current BitArray
203) Item property is the default property, so you can omit its name when accessing elements
204) Item property throws an exception if the requested key is not in the dictionary
205) Jagged two-dimensional array
206) KeyedCollection(TKey, TItem) is the abstract base class for a collection whose keys are embedded in the values
207) LinkedList(T) Class represents a doubly linked list
208) LinkedListNode(Of (T)), adds it to a LinkedList(Of (T)), tracks values of its properties as the LinkedList(Of (T)) changes.
209) LinkedListNode(T) Class represents a node in a LinkedList(Of T)
210) LinkedListNode(T) Class represents a node in a LinkedList(Of T) This class cannot be inherited
211) List all Directories under a directory
212) List all files under a directory
213) List Linq operator
214) List Range operation
215) List the Unicode code point of each of the control characters
216) List(T) BinarySearch Method searches sorted List(Of T) using the default comparer
217) List(T) Class is a strongly typed list of objects that can be accessed by index
218) List(T) ConvertAll(TOutput) Method converts List(Of T) to another type
219) List(T) CopyTo Method copies a range of elements from the List(Of T) to one-dimensional array
220) List(T) ForEach Method Performs the specified action on each element of the List(Of T)
221) List(T) IndexOf Method searches for object and returns the zero-based index
222) List(T) LastIndexOf Method searches for the specified object and returns the zero-based index of the last occurrence
223) List(T) Reverse Method reverses the order of the elements in the specified range
224) ListDictionary Add Method adds an entry with the specified key and value into the ListDictionary
225) ListDictionary Contains Method tells whether the ListDictionary contains a specific key
226) ListDictionary CopyTo Method copies the ListDictionary entries to a one-dimensional Array
227) Lookup(TKey, TElement) Represents a collection of keys each mapped to one or more values
228) Loop through Collection
229) Make Dictionary based on your own Object
230) Move the first node to be the last node
231) NameObjectCollectionBase BaseAdd adds an entry with the key and value into NameObjectCollectionBase instance
232) NameObjectCollectionBase BaseClear Method removes all entries from the NameObjectCollectionBase instance
233) NameObjectCollectionBase BaseGet Method gets value at the specified index of the NameObjectCollectionBase instance
234) NameObjectCollectionBase BaseGetAllKeys Method returns a String array that contains all the keys
235) NameObjectCollectionBase BaseHasKeys Method tells whether the NameObjectCollectionBase instance contains entries whose keys
236) NameObjectCollectionBase BaseRemove Method removes entries with the specified key
237) NameObjectCollectionBase BaseSet Method sets the value of the entry at the specified index
238) NameObjectCollectionBase IsReadOnly Property tells whether the NameObjectCollectionBase instance is read-only
239) NameValueCollection Class represents String keys and String values
240) OrderedDictionary Class represents a collection of keyvalue pairs that are accessible by the key or index
241) Our Queue based on out List
242) Our Stack based on our List
243) Our Tree Structure
244) Output Items in a SortedList
245) Passes an ArraySegment(Of (T)) structure to a method
246) Performs the bitwise AND operation for BitArray
247) Performs the specified action on each element of the specified array
248) Preserve an Array
249) Push Integer into a Stack
250) Queue Class represents a first-in, first-out collection of objects
251) Queue Demo
252) Queue Item Count
253) Quick Sort Demo
254) ReadOnlyCollection(T) Class Provides the base class for a generic read-only collection
255) ReadOnlyCollectionBase is abstract base class for a strongly typed non-generic read-only collection
256) ReDim
257) ReDim an Array
258) Reference an Element in an Array by Index
259) Remove a range
260) Remove an element from List
261) Remove element and clear the collection
262) Remove element from HashSet with condition function
263) Remove first and Find last
264) Remove Item from Most Recent Used Item List
265) Returns an IEnumerator for the Array
266) Reverse the order - elements will be in descending order
267) Reverses the elements in a range
268) Reverses the order of the elements in a range
269) Reverses the order of the elements in the entire ArrayList
270) Reverses the sequence of the elements in the entire one-dimensional Array
271) Search item with IndexOf and Contains
272) Searches an entire one-dimensional sorted Array for a specific element
273) Searches for a key
274) Searches for a key and deletes it
275) Searches for a specific key
276) Searches for a specific value
277) Searches for a value
278) Searches for an element that matches the conditions
279) Searches for an element that matches the conditions defined by the specified predicate
280) Searches for the first occurrence of the duplicated value in a section of the Array
281) Searches for the first occurrence of the duplicated value in the last section of the Array
282) Searches for the last occurrence of the duplicated value in a section of the Array
283) Searches for the last occurrence of the duplicated value in the first section of the Array
284) Searches for the object and returns the index of the first occurrence
285) Searches for the object and returns the index of the last occurrence
286) Searches sorted Array for a specific element, using the IComparable(Of T) generic interface
287) Searches sorted Array for a value using the specified IComparer(Of T) generic interface
288) Seclare a 4x3 Integer array
289) Set Array Element Value by Index
290) Sets a range of elements in the Array to zero, to false, or to Nothing, depending on the element type
291) Simple Demo for NameValueCollection
292) Simple Demo for Queue
293) Simple Demo for Stack
294) Simple Example for Sorted List
295) Sort an Array
296) Sort an Array and Use Array Length properties
297) SortedList Add Method adds key and value to a SortedList object
298) SortedList Class represents a collection of keyvalue pairs that are sorted by the keys
299) SortedList Clear Method removes all elements from a SortedList object
300) SortedList Contains Method determines whether a SortedList object contains a specific key
301) SortedList CopyTo Method copies SortedList to a one-dimensional Array
302) SortedList GetByIndex Method gets the value at the specified index of a SortedList object
303) SortedList IndexOfKey Method returns the zero-based index of the specified key in a SortedList object
304) SortedList IsSynchronized Property tells whether access to a SortedList object is synchronized (thread safe)
305) SortedList Remove removes element with the specified key from a SortedList object
306) SortedList SetByIndex Method replaces the value at a specific index in a SortedList object
307) SortedList(TKey, TValue) represents a collection of keyvalue pairs that are sorted by key based
308) Sorts a pair of Array objects (one contains the keys and the other contains the values)
309) Sorts a pair of one-dimensional Array objects
310) Sorts a section of the Array pair using the reverse case-insensitive comparer
311) Sorts a section of the Array using the reverse case-insensitive comparer
312) Sorts the elements in a range in an Array using the IComparable(Of T) generic interface
313) Sorts the elements in a range in ArrayList using the specified comparer
314) Sorts the elements in an Array using the specified Comparison(Of T)
315) Sorts the elements in the ArrayList using the specified comparer
316) Sorts the elements in the entire ArrayList
317) Sorts the entire Array pair using the default comparer
318) Sorts the entire Array pair using the reverse case-insensitive comparer
319) Sorts the entire Array using the default comparer
320) Sorts the entire Array using the reverse case-insensitive comparer
321) Stack Class represents a simple last-in-first-out (LIFO) non-generic collection of objects
322) Stack Demo
323) Stack to Array
324) Stack(Of (T)) the ToArray method
325) Store Class in a Collection and Retrieve by Name
326) Store different Class in an ArrayList
327) Store Environment Variables into a Hash table
328) Store Object in Most Recent Used Item List
329) Store Objects in Collection and retrieve
330) Store Objects into ArrayList
331) Store your won Class in an Array
332) StringCollection Add Method adds a string to the end of the StringCollection
333) StringCollection Clear Method removes all the strings from the StringCollection
334) StringCollection Contains Method determines whether the specified string is in the StringCollection
335) StringCollection CopyTo Method copies StringCollection values to a one-dimensional array
336) StringDictionary Add adds an entry into the StringDictionary
337) StringDictionary Class implements a hash table with the key and the value
338) StringDictionary ContainsKey Method determines if the StringDictionary contains a specific key
339) StringDictionary CopyTo Method copies dictionary values to a one-dimensional Array
340) StringDictionary Count gets the number of keyvalue pairs
341) StringDictionary Values Property gets a collection of values in the StringDictionary
342) StringEnumerator Class supports iteration over a StringCollection
343) Synchronize an ArrayList, determine if an ArrayList is synchronized and use a synchronized ArrayList
344) The Add method throws an exception if the new key is already in the dictionary
345) The Add method throws an exception if the new key is already in the list
346) The array is passed to the Queue(Of (T)) constructor that takes IEnumerable(Of (T))
347) The default Item property can be used to change the value associated with a key
348) The default Item property throws an exception if the requested key is not in the dictionary
349) The default Item property throws an exception if the requested key is not in the list
350) The Dequeue method is used to dequeue the first string
351) The elements of the queue are enumerated, which does not change the state of the queue
352) The Item property is the default property
353) The Item property is the default property, so you can omit its name when accessing elements
354) The Keys property is an efficient way to retrieve keys by index
355) The Peek method is used to look at the next item in the queue
356) The ToArray method is used to create an array and copy the queue elements to it
357) The Values property is an efficient way to retrieve values by index
358) To get the keys alone, use the Keys property
359) To get the values alone, use the Values property
360) To get the values, use the Values property
361) Trim a List
362) Trim down extra capacity from List
363) TryGetValue can be a more efficient way to retrieve values
364) Two dimension array Demo
365) Two Dimensional Rectangle Array
366) Two ways to loop through Array
367) Use Action(Of (T)) delegate to print the contents of a List(Of (T)) object
368) Use Array CreateInstance to Create Array
369) Use ArrayList to Store your own class
370) Use DataColumnMapping to Map column
371) Use For EachNext to find a minimum grade
372) Use IComparer to sort by different properties
373) Use IDisposable
374) Use the Remove method to remove a keyvalue pair
375) Uses a cursor to step through the message queues and list the public queues on the network
376) Uses GetLowerBound and GetUpperBound in the for loop
377) Uses the enumerator with ReadOnlyCollectionBase
378) Uses the For Each statement which hides the complexity of the enumerator
379) Uses the Keys, Values, Count, and Item properties
380) Using a BindingSource component to bind a list to a DataGridView control
381) Using a Where clause to find all projectList that are in stock and cost more than 3 00 per unit
382) Using Except to do minus between two lists
383) Using Group By to partition a list of words by first letter
384) Using Order By to sort a list of words alphabetically
385) Using Order By to sort a list of words by length
386) Using Payment By to sort a list of projectList by units in stock from highest to lowest
387) Using Take to get the first 3 orders from employeeList
388) What is the different between the Count and Capacity
389) When using foreach to enumerate list elements, the elements are retrieved as KeyValuePair objects
390) When you use foreach to enumerate dictionary elements, the elements are retrieved as KeyValuePair objects
391) Your own Generic List Dictionary
392) Your own List Data structure